package org.yoki.edu.bg.radius.core.raw.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.yoki.edu.bg.radius.core.raw.infra.RadCheckRepository;
import com.yunzhitx.cloud.common.model.ddd.InstanceFactory;
import lombok.Data;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 代码生成器自动生成
 * Date:2018-1-3 13:39:27
 * @author
 */
@Data
@Table(name = "radius_rad_check")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RadCheck implements Serializable{

	private static final long serialVersionUID = 1L;

    /** */
    @Column(name = "id")
    private Integer id;
    /** */
    @Column(name = "username")
	private String username;
    /** */
    @Column(name = "attribute")
	private String attribute;
    /** */
    @Column(name = "op")
	private String op;
    /** */
    @Column(name = "value")
	private String value;
    /** 物理地址*/
    @Column(name = "deviceMac")
	private String deviceMac;
    /** */
    @Column(name = "loginIp")
	private String loginIp;
    /** 登录方式，phone、weChat*/
    @Column(name = "loginType")
	private String loginType;
    /** 微信openId*/
    @Column(name = "openId")
	private String openId;
    /** 该账号是否已经关注公众号*/
    @Column(name = "weChatMark")
	private Boolean weChatMark;
    /** 创建时间*/
    @Column(name = "createDate")
	private Date createDate;
    /** 更新时间*/
    @Column(name = "updateDate")
	private Date updateDate;
	public RadCheck(){}

    public RadCheck(Integer id){setId(id);}

    private static RadCheckRepository radCheckRepository;
    public static RadCheckRepository getRadCheckRepository(){
		if(null==radCheckRepository){
			radCheckRepository = InstanceFactory.getInstance(RadCheckRepository.class);
		}
    	return radCheckRepository;
    }

    /**
    * 根据Id，更新RadCheck
    *
    * @param
    * @return
    */
    public void update() {
        getRadCheckRepository().updateByPrimaryKeySelective(this);
    }

    /**
    * 根据主键ID查询RadCheck
    * @param id
    * @return
    */
    /*
    public static RadCheckVO selectDetailById(int id) {
        RadCheckVO vo = getRadCheckRepository().selectDetailById(id);
        return vo;
    }
    */

}